<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="resources/doc.css" charset="UTF-8" type="text/css"/>
<link rel="shortcut icon" href="resources/report.gif" type="image/gif"/>
<title>
					JaCoCo -
					jacoco:check</title>
</head>
<body>
<div class="breadcrumb">
<a href="../index.html" class="el_report">JaCoCo</a>
					&gt;
					<a href="index.html" class="el_group">Documentation</a>
					&gt;
					<a href="maven.html" class="el_group">Maven</a>
					&gt;
					<span class="el_source">jacoco:check</span>
</div>
<div id="content">
    <h1>jacoco:check</h1>
      <p>
<b>Full name</b>:</p>
      <p>org.jacoco:jacoco-maven-plugin:0.8.0:check</p>
      <p>
<b>Description</b>:</p>
      <div>Checks that the code coverage metrics are being met.</div>
      <p>
<b>Attributes</b>:</p>
      <ul>
        <li>Requires a Maven project to be executed.</li>
        <li>Since version: <code>0.6.1</code>.</li>
        <li>Binds by default to the <a href="http://maven.apache.org/ref/current/maven-core/lifecycles.html">lifecycle phase</a>: <code>verify</code>.</li>
      </ul>
      <h2>Required Parameters</h2>
        <table class="coverage">
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td>Since</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<b>
<a href="#haltOnFailure">haltOnFailure</a>
</b>
</td>
<td>
<code>boolean</code>
</td>
<td>
<code>0.6.1</code>
</td>
<td>Halt the build if any of the checks fail.<br/>
<b>Default value is</b>: <code>true</code>.<br/>
<b>User property is</b>: <code>jacoco.haltOnFailure</code>.<br/>
</td>
</tr>
<tr>
<td>
<b>
<a href="#rules">rules</a>
</b>
</td>
<td>
<code>List</code>
</td>
<td>
<code>0.6.1</code>
</td>
<td>
<p>Check configuration used to specify rules on element types
(BUNDLE, PACKAGE, CLASS, SOURCEFILE or METHOD) with a list of
limits. Each limit applies to a certain counter (INSTRUCTION, LINE,
BRANCH, COMPLEXITY, METHOD, CLASS) and defines a minimum or maximum
for the corresponding value (TOTALCOUNT, COVEREDCOUNT, MISSEDCOUNT,
COVEREDRATIO, MISSEDRATIO). If a limit refers to a ratio the range
is from 0.0 to 1.0 where the number of decimal places will also
determine the precision in error messages. A limit ratio may
optionally be declared as a percentage where 0.80 and 80% represent
the same value, the value must end with %.</p>
<p>If not specified the following defaults are assumed:</p>
<ul>
<li>rule element: BUNDLE</li>
<li>limit counter: INSTRUCTION</li>
<li>limit value: COVEREDRATIO</li>
</ul>
<p>Note that you must use implementation hints for
rule and limit when using Maven 2, with Maven 3
you do not need to specify the attributes.</p>
<p>This example requires an overall instruction coverage of 80% and
no class must be missed:</p>
<pre>
<code>
&lt;rules&gt;
  &lt;rule implementation="org.jacoco.maven.RuleConfiguration"&gt;
    &lt;element&gt;BUNDLE&lt;/element&gt;
    &lt;limits&gt;
      &lt;limit implementation="org.jacoco.report.check.Limit"&gt;
        &lt;counter&gt;INSTRUCTION&lt;/counter&gt;
        &lt;value&gt;COVEREDRATIO&lt;/value&gt;
        &lt;minimum&gt;0.80&lt;/minimum&gt;
      &lt;/limit&gt;
      &lt;limit implementation="org.jacoco.report.check.Limit"&gt;
        &lt;counter&gt;CLASS&lt;/counter&gt;
        &lt;value&gt;MISSEDCOUNT&lt;/value&gt;
        &lt;maximum&gt;0&lt;/maximum&gt;
      &lt;/limit&gt;
    &lt;/limits&gt;
  &lt;/rule&gt;
&lt;/rules&gt;</code>
</pre>

<p>This example requires a line coverage minimum of 50% for every
class except test classes:</p>
<pre>
<code>
&lt;rules&gt;
  &lt;rule&gt;
    &lt;element&gt;CLASS&lt;/element&gt;
    &lt;excludes&gt;
      &lt;exclude&gt;*Test&lt;/exclude&gt;
    &lt;/excludes&gt;
    &lt;limits&gt;
      &lt;limit&gt;
        &lt;counter&gt;LINE&lt;/counter&gt;
        &lt;value&gt;COVEREDRATIO&lt;/value&gt;
        &lt;minimum&gt;50%&lt;/minimum&gt;
      &lt;/limit&gt;
    &lt;/limits&gt;
  &lt;/rule&gt;
&lt;/rules&gt;</code>
</pre>
<br/>
</td>
</tr>
</tbody>
</table>
      
      <h2>Optional Parameters</h2>
        <table class="coverage">
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td>Since</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<b>
<a href="#dataFile">dataFile</a>
</b>
</td>
<td>
<code>File</code>
</td>
<td>
<code>0.6.1</code>
</td>
<td>File with execution data.<br/>
<b>Default value is</b>: <code>${project.build.directory}/jacoco.exec</code>.<br/>
</td>
</tr>
<tr>
<td>
<b>
<a href="#excludes">excludes</a>
</b>
</td>
<td>
<code>List</code>
</td>
<td>
<code>0.6.1</code>
</td>
<td>A list of class files to exclude from
instrumentation/analysis/reports. May use wildcard characters (*
and ?). When not specified nothing will be excluded.<br/>
</td>
</tr>
<tr>
<td>
<b>
<a href="#includes">includes</a>
</b>
</td>
<td>
<code>List</code>
</td>
<td>
<code>0.6.1</code>
</td>
<td>A list of class files to include in
instrumentation/analysis/reports. May use wildcard characters (*
and ?). When not specified everything will be included.<br/>
</td>
</tr>
<tr>
<td>
<b>
<a href="#skip">skip</a>
</b>
</td>
<td>
<code>boolean</code>
</td>
<td>
<code>0.6.1</code>
</td>
<td>Flag used to suppress execution.<br/>
<b>Default value is</b>: <code>false</code>.<br/>
<b>User property is</b>: <code>jacoco.skip</code>.<br/>
</td>
</tr>
</tbody>
</table>
      
      <h2>Parameter Details</h2>
        <p>
<b>
<a name="dataFile">dataFile</a>:</b>
</p>
        <div>File with execution data.</div>
        <ul>
          <li>
<b>Type</b>: <code>java.io.File</code>
</li>
          <li>
<b>Since</b>: <code>0.6.1</code>
</li>
          <li>
<b>Required</b>: <code>No</code>
</li>
          <li>
<b>Default</b>: <code>${project.build.directory}/jacoco.exec</code>
</li>
        </ul>
<p>
<b>
<a name="excludes">excludes</a>:</b>
</p>
        <div>A list of class files to exclude from
instrumentation/analysis/reports. May use wildcard characters (*
and ?). When not specified nothing will be excluded.</div>
        <ul>
          <li>
<b>Type</b>: <code>java.util.List</code>
</li>
          <li>
<b>Since</b>: <code>0.6.1</code>
</li>
          <li>
<b>Required</b>: <code>No</code>
</li>
        </ul>
<p>
<b>
<a name="haltOnFailure">haltOnFailure</a>:</b>
</p>
        <div>Halt the build if any of the checks fail.</div>
        <ul>
          <li>
<b>Type</b>: <code>boolean</code>
</li>
          <li>
<b>Since</b>: <code>0.6.1</code>
</li>
          <li>
<b>Required</b>: <code>Yes</code>
</li>
          <li>
<b>User Property</b>: <code>jacoco.haltOnFailure</code>
</li>
          <li>
<b>Default</b>: <code>true</code>
</li>
        </ul>
<p>
<b>
<a name="includes">includes</a>:</b>
</p>
        <div>A list of class files to include in
instrumentation/analysis/reports. May use wildcard characters (*
and ?). When not specified everything will be included.</div>
        <ul>
          <li>
<b>Type</b>: <code>java.util.List</code>
</li>
          <li>
<b>Since</b>: <code>0.6.1</code>
</li>
          <li>
<b>Required</b>: <code>No</code>
</li>
        </ul>
<p>
<b>
<a name="rules">rules</a>:</b>
</p>
        <div>
<p>Check configuration used to specify rules on element types
(BUNDLE, PACKAGE, CLASS, SOURCEFILE or METHOD) with a list of
limits. Each limit applies to a certain counter (INSTRUCTION, LINE,
BRANCH, COMPLEXITY, METHOD, CLASS) and defines a minimum or maximum
for the corresponding value (TOTALCOUNT, COVEREDCOUNT, MISSEDCOUNT,
COVEREDRATIO, MISSEDRATIO). If a limit refers to a ratio the range
is from 0.0 to 1.0 where the number of decimal places will also
determine the precision in error messages. A limit ratio may
optionally be declared as a percentage where 0.80 and 80% represent
the same value, the value must end with %.</p>
<p>If not specified the following defaults are assumed:</p>
<ul>
<li>rule element: BUNDLE</li>
<li>limit counter: INSTRUCTION</li>
<li>limit value: COVEREDRATIO</li>
</ul>
<p>Note that you must use implementation hints for
rule and limit when using Maven 2, with Maven 3
you do not need to specify the attributes.</p>
<p>This example requires an overall instruction coverage of 80% and
no class must be missed:</p>
<pre>
<code>
&lt;rules&gt;
  &lt;rule implementation="org.jacoco.maven.RuleConfiguration"&gt;
    &lt;element&gt;BUNDLE&lt;/element&gt;
    &lt;limits&gt;
      &lt;limit implementation="org.jacoco.report.check.Limit"&gt;
        &lt;counter&gt;INSTRUCTION&lt;/counter&gt;
        &lt;value&gt;COVEREDRATIO&lt;/value&gt;
        &lt;minimum&gt;0.80&lt;/minimum&gt;
      &lt;/limit&gt;
      &lt;limit implementation="org.jacoco.report.check.Limit"&gt;
        &lt;counter&gt;CLASS&lt;/counter&gt;
        &lt;value&gt;MISSEDCOUNT&lt;/value&gt;
        &lt;maximum&gt;0&lt;/maximum&gt;
      &lt;/limit&gt;
    &lt;/limits&gt;
  &lt;/rule&gt;
&lt;/rules&gt;</code>
</pre>

<p>This example requires a line coverage minimum of 50% for every
class except test classes:</p>
<pre>
<code>
&lt;rules&gt;
  &lt;rule&gt;
    &lt;element&gt;CLASS&lt;/element&gt;
    &lt;excludes&gt;
      &lt;exclude&gt;*Test&lt;/exclude&gt;
    &lt;/excludes&gt;
    &lt;limits&gt;
      &lt;limit&gt;
        &lt;counter&gt;LINE&lt;/counter&gt;
        &lt;value&gt;COVEREDRATIO&lt;/value&gt;
        &lt;minimum&gt;50%&lt;/minimum&gt;
      &lt;/limit&gt;
    &lt;/limits&gt;
  &lt;/rule&gt;
&lt;/rules&gt;</code>
</pre>
</div>
        <ul>
          <li>
<b>Type</b>: <code>java.util.List</code>
</li>
          <li>
<b>Since</b>: <code>0.6.1</code>
</li>
          <li>
<b>Required</b>: <code>Yes</code>
</li>
        </ul>
<p>
<b>
<a name="skip">skip</a>:</b>
</p>
        <div>Flag used to suppress execution.</div>
        <ul>
          <li>
<b>Type</b>: <code>boolean</code>
</li>
          <li>
<b>Since</b>: <code>0.6.1</code>
</li>
          <li>
<b>Required</b>: <code>No</code>
</li>
          <li>
<b>User Property</b>: <code>jacoco.skip</code>
</li>
          <li>
<b>Default</b>: <code>false</code>
</li>
        </ul>
      
    
  </div>
<div class="footer">
<span class="right">
<a href="http://www.jacoco.org/jacoco">JaCoCo</a>
						 
						0.8.0.201801022044</span>
<a href="../doc/license.html">Copyright</a>
					©
					2009, 2018
					Mountainminds GmbH &amp; Co. KG and Contributors
				</div>
</body>
</html>
